let li = document.querySelectorAll(".desc-title li")
let ol = document.querySelectorAll(".desc-content li")
console.log(li, ol);
let pagenum = 0;

function tabs() {
    li.forEach((btn, i) => { //循环遍历的到所有的li
        btn.onclick = function() {
            li[pagenum].style.backgroundColor = 'white'
            li[i].style.backgroundColor = 'red'

            ol[pagenum].style.backgroundColor = 'white'
            ol[i].style.backgroundColor = 'red'
            pagenum = i;
        }
    })
}
tabs();